const state = {
  objItemx: {
    aaa: 2
  },
  objItem: {
    aaa: 1
  },
  objItem2: {
    aaa: 12
  },
  strItem: 'aaaa',
}

const mutations = {
  setObjItem(state, obj) {
    state.objItem = obj
  },
  setObjItem2(state, obj) {
    state.objItem2 = obj
  },
  setStrItem(state, str) {
    state.strItem = str
  }
}

const actions = {
}

// 可以设置局部getters
const getters = {
  objItem: state => state.objItem,
  objItem2: state => state.objItem2,
  objItemx: state => state.objItemx,
  strItem: state => state.strItem,
};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}